<#assign ctx=request.contextPath />
<!DOCTYPE html>
<html>
<head>
	<base id="ctx" href="${ctx}">
	<meta charset="UTF-8">
	<title>添加小区</title>
	<link rel="stylesheet" href="${ctx}/css/datacenter/addcommunity.css" />
	<link rel="stylesheet" href="${ctx}/layui/css/layui.css" />
</head>
<body>

<div class="body">
	<h1>添加小区</h1>
</div>
<div class="heads">
	<table>
		<tr>
			<td><span class="symbol">*</span> <span class="size">小区名称：</span><input class="name tm" type="text" placeholder="请输入小区名称"/></td>
		</tr>
		<tr>
			<td><span class="symbol ">*</span> <span class="size">所在地区：</span><input class="name address tm" type="text" placeholder="请输入所在位置"/></td>
		</tr>
		<tr>
			<td><span class="symbol ">*</span> <span class="size">详细地址：</span><input class="tm  detailAddress name" type="text" placeholder="详细地址"/></td>
		</tr>
		<tr>
			<td><span class="symbol ">*</span> <span class="size">客服电话：</span><input class="tm serviceTel name" type="text" placeholder="客服电话"/></td>
		</tr>
		<tr>
			<td><span class="symbol behind">*</span> <span class="size">负责人：</span><input class="name leader tm" type="text" placeholder="负责人" /></td>
		</tr>
		<tr>
			<td><span class="symbol behinds">*</span> <span class="size">负责人电话：</span><input class="name leaderPhone tm" type="text" placeholder="负责人电话"/></td>
		</tr>

		<tr>
			<td><span class="symbol logo">*</span> <span class="size">小区logo：</span><input class="name logos tm" type="text" placeholder="小区logo"/></td>
		</tr>
		<tr>
			<td><span class="symbol behinds">*</span> <span class="size">小区背景图：</span><input class="name backgroundImage tm" type="text" placeholder="小区背景图"/></td>
		</tr>
		<tr>
			<td><a class="layui-btn  save">添加</a>
				<a class="layui-btn ">返回</a>
			</td>
		</tr>
	</table>
</div>
<script src="${ctx}/js/jquery-3.2.1.js"></script>
<script>
	$(".save").click(function () {
		alert(111);
		var name=$(".name").val();
		var address=$(".address").val();
		var detailAddress=$(".detailAddress").val();
		var serviceTel=$(".serviceTel").val();
		var leader=$(".leader").val();
		var leaderPhone=$(".leaderPhone").val();
		var logos=$(".logos").val();
		var backgroundImage=$(".backgroundImage").val();
		console.log(name);
		console.log(address);
		console.log(detailAddress);
		console.log(serviceTel);
		console.log(leader);
		console.log(leaderPhone);
		console.log(logos);
		console.log(backgroundImage);
		$.get("addCommunitydata",{"name":name,"address":address,"detailaddress":detailAddress,"servicetel":serviceTel,"leader":leader,"leaderphone":leaderPhone,"logo":logos,"backgroundimage":backgroundImage},function (data) {
				console.log(data);
        },'json')
    })
</script>
</body>
</html>
